import React,{ Component } from "react";
import Input from './input'
class Parent extends Component{
  constructor(){
    super()
    this.InputComponentRef = React.createRef()
  }

  render(){
    return (
      <div>
        <Input ref={this.InputComponentRef} />
        <button onClick={()=> this.InputComponentRef.current.focusInput()}>button</button>
      </div>
    )
  }
}

export default Parent